Purpose |
Retrieves the active printer tray. |
Syntax |
XPRINT GET TRAY TO TrayVar& Function Form: TrayVar& = XPRINT(TRAY) |
Remarks |
XPRINT GET TRAY retrieves the paper tray which is active on the host printer. A descriptive value is assigned to the long integer variable specified by TrayVar&. The following equates are predefined in the compiler, and represent the most common paper trays: %DMBIN_UPPER = 1 %DMBIN_LOWER = 2 %DMBIN_MIDDLE = 3 %DMBIN_MANUAL = 4 %DMBIN_ENVELOPE = 5 %DMBIN_ENVMANUAL = 6 %DMBIN_AUTO = 7 %DMBIN_TRACTOR = 8 %DMBIN_SMALLFMT = 9 %DMBIN_LARGEFMT = 10 %DMBIN_LARGECAPACITY = 11 %DMBIN_CASSETTE = 14 %DMBIN_FORMSOURCE = 15 Other tray codes may be defined by Windows or printer suppliers, so your program should be written to consider that possibility. You can use XPRINT GET TRAYS to obtain a list of all the paper trays supported by the attached host printer. If the printer does not support the tray change requested, error 5 is generated. If executed without a host printer attached, error 57 is generated. |
See also |